package com.leenmvc.core.init;

/**
 * 框架常量
 */
public class Constant {

    // 开发者模式，所有的权限失效
    public final static boolean dev_mode = true;

    public final static String PARAMS_WANT = "want";

    public final static String WORK_DIR = System.getProperty("user.dir");

    public final static String PARAM_ID = "id";

    public final static String PARAM_NAME = "name";

    public final static String SQLKEY = "sqlKey";

    public final static String PAGE = "page";

    public final static String PAGESIZE = "pageSize";

    public final static String DEFAULT_GETPAGE_KEY = "getPage";

    public final static String DEFAULT_KVS_KEY = "getKvs";

    public final static String REQUESTBODY = "requestBody";

    public final static String SQL_SELECT = "select";

    public final static String DATASOURCE_BEAN_PRE = "dataSource_";

    /**
     * 数据源以_read结尾那么它就是一个读库
     */
    public final static String DATASOURCE_BEAN_READ_SUF = "_read";

    /**
     * 数据源以_default结尾那么它是默认的库
     */
    public final static String DATASOURCE_BEAN_DEFAULT_SUF = "_default";

    /**
     * 数据源以_write结尾那么它是写库
     */
    public final static String DATASOURCE_BEAN_WRITE_SUF = "_write";

    /**
     * 数据源以 _dbinfo 结尾那么它是 类似于mysql中的 information_schema
     */
    public final static String DATASOURCE_BEAN_INFO_SUF = "_dbinfo";

    public final static String SQLSESSIONFACTORY_BEAN_PRE = "sqlSessionFactory_";


    public final static String LEFT_LIKE = "LL";

    public final static String RIGHT_LIKE = "RL";

    /**
     * 表示传过来的参数是（前端用在开头位置）
     */
    public final static String ALL_LIKE = "AL";
    /**
     * 表示传过来的参数是用于分页的（前端用在开头位置）
     */
    public final static String ORDER_BY = "OB";
    /**
     * 表示传过来的参数不等于（前端用在开头位置）
     */
    public final static String NOT_EQU = "NE";
    /**
     * 表示传过来的参数小于（前端用在开头位置）
     */
    public final static String LE = "LE";

    /**
     * 表示传过来的参数大于（前端用在开头位置）
     */
    public final static String GE = "GE";

    public final static String DOT = ".";

    public final static String COMMA = ",";

    public final static String AND = "&";

    public final static String BLANK_AND = " and ";
    public final static String BLANK_ON = " on ";
    public final static String BLANK_ORDER_BY = " order by ";

    public final static String QUESTION_MARK_SIGN = "?";

    public final static String QUESTION_EQU_MARK_SIGN = " = ?";

    public final static String LEFT_JOIN = " left join ";

    public final static String SELECT = "select ";
    public final static String WHERE = " where ";
    public final static String FROM = " from ";

    public final static String LIMIT = " limit ";

    public final static String EQUAL_SIGN = " = ";

    public final static String COMMON_URL_PAGE = "page";
    public final static String COMMON_URL_BASE = "system/common";
    public final static String COMMON_URL_BASE_VIEW = "/system/common/view";
    public final static String COMMON_URL_SQL_PAGE = "sqlPage";
    public final static String COMMON_URL_GETBYID = "getById";
    public final static String COMMON_URL_GETALL = "getAll";
    public final static String COMMON_URL_GETLIST = "getList";
    public static final String COMMON_URL_KVS = "kvs";
    public static final String COMMON_URL_SQLKVS = "sqlKvs";

    public final static String CONTROLLER_NOTE = "note";
    public final static String CONTROLLER_URI = "uri";


}
